package atm05;

import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * 查询界面
 */
public class SearchPanel extends JPanel{
    private JLabel balance = new JLabel("您的余额为：");
    private JButton exit = new JButton(new ImageIcon("src/atm05/Images/buttonOff.jpg"));
    private Font font = new Font("黑体",Font.BOLD,25);

    public SearchPanel(ATM05 atm05) {
        this.setLayout(null);

        balance.setBounds(320,250,250,50);
        balance.setFont(font);
        exit.setBounds(880,380,140,50);
        exit.addActionListener(new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                atm05.showPanel("menu");
            }
        });

        this.add(balance);
        this.add(exit);

        this.setOpaque(false);
    }

}
